



//
//  RootViewController.m
//  广告页
//
//  Created by YYY on 2017/2/20.
//  Copyright © 2017年 成品家（北京）网路科技有限公司. All rights reserved.
//

#import "RootViewController.h"

#import "HomePageViewController.h"
#import "ShopMallViewController.h"
#import "MineViewController.h"

#import "BaseNavigationController.h"

@interface RootViewController ()

@end

@implementation RootViewController

- (void)viewDidLoad
{
    [super viewDidLoad];
    HomePageViewController *homePage = [[HomePageViewController alloc]init];
    
    ShopMallViewController *shopMall = [[ShopMallViewController alloc]init];
    shopMall.title = @"商城";
    
    NSArray *controllers = @[homePage,shopMall];
    NSMutableArray *tempControllers = [NSMutableArray array];
    for (int i=0; i<controllers.count; i++)
    {
        BaseNavigationController *navVC = [[BaseNavigationController alloc]initWithRootViewController:controllers[i]];
        [tempControllers addObject:navVC];
    }
    
    [self setViewControllers:tempControllers animated:YES];
    // Do any additional setup after loading the view.
}



- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
